#!/bin/bash

target_dir=${1}

tar cf rules.tar \
      ./rules_to_exclude ./exclude_rules.sh ./main.plg \
      ../a2/a2_gramma.plg ../a3/a3_gramma.plg ../a4/a4_gramma.plg ../a5/a5_gramma.plg ../a6/a6_gramma.plg ../a7/a7_gramma.plg ../a8/a8_gramma.plg \
      ../a9/a9_gramma.plg ../a10/a10_gramma.plg ../a11/a11_gramma.plg ../a12/a12_gramma.plg ../a13/a13_gramma.plg \
      ../utils/os_helpers.plg ../utils/ebnf_helpers.plg ../utils/file_to_charLst.plg ../utils/syntax_helpers.plg ../utils/test_helpers.plg ../utils/pretty_print.plg

mkdir ${target_dir}
mv rules.tar ${target_dir}

cd ${target_dir}

tar xf rules.tar  # keep rules.tar to be able to restore "gramma.plg" files and reapply rules modifications with new "rules_to_exclude"

